\hypertarget{service__redis__client_8hpp}{}\doxysection{redis/service\+\_\+redis\+\_\+client.hpp File Reference}
\label{service__redis__client_8hpp}\index{redis/service\_redis\_client.hpp@{redis/service\_redis\_client.hpp}}


服务redis客户端  


{\ttfamily \#include \char`\"{}box/service\+\_\+context.\+hh\char`\"{}}\newline
{\ttfamily \#include \char`\"{}hiredis/include/hiredis.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}redis/redis.\+hh\char`\"{}}\newline
{\ttfamily \#include \char`\"{}service\+\_\+tool.\+hpp\char`\"{}}\newline
{\ttfamily \#include \char`\"{}singleton.\+hpp\char`\"{}}\newline
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{classguild__service_1_1common_1_1service__redis__client}{guild\+\_\+service\+::common\+::service\+\_\+redis\+\_\+client}}
\begin{DoxyCompactList}\small\item\em 服务redis客户端类 \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{service__redis__client_8hpp_a0752d2320b846227ac97ce216d831e27}{Redis\+Client\+Singleton}}(...)
\begin{DoxyCompactList}\small\item\em redis客户端单例 \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{service__redis__client_8hpp_a879938d13a74dc6d2b0b8b0b4a20b03e}\label{service__redis__client_8hpp_a879938d13a74dc6d2b0b8b0b4a20b03e}} 
using \mbox{\hyperlink{service__redis__client_8hpp_a879938d13a74dc6d2b0b8b0b4a20b03e}{guild\+\_\+service\+::redis\+\_\+handler\+\_\+type}} = common\+::service\+\_\+redis\+\_\+client\+::redis\+\_\+handler\+\_\+type
\begin{DoxyCompactList}\small\item\em redis回调函数类型 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{service__redis__client_8hpp_a40db0e49ed8f7eb3dac18a32b45131db}\label{service__redis__client_8hpp_a40db0e49ed8f7eb3dac18a32b45131db}} 
using \mbox{\hyperlink{service__redis__client_8hpp_a40db0e49ed8f7eb3dac18a32b45131db}{guild\+\_\+service\+::redis\+\_\+result\+\_\+type}} = common\+::service\+\_\+redis\+\_\+client\+::redis\+\_\+result\+\_\+type
\begin{DoxyCompactList}\small\item\em redis返回结果类型 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{service__redis__client_8hpp_a0db98d4ff8b7a3af8ae8d0e39f7d5448}\label{service__redis__client_8hpp_a0db98d4ff8b7a3af8ae8d0e39f7d5448}} 
using \mbox{\hyperlink{service__redis__client_8hpp_a0db98d4ff8b7a3af8ae8d0e39f7d5448}{guild\+\_\+service\+::redis\+\_\+reply\+\_\+type}} = common\+::service\+\_\+redis\+\_\+client\+::redis\+\_\+reply\+\_\+type
\begin{DoxyCompactList}\small\item\em redis返回原始类型 \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
constexpr uint32\+\_\+t \mbox{\hyperlink{service__redis__client_8hpp_a1d1da97ea7897858a311261ebd3f59c6}{guild\+\_\+service\+::k\+Redis\+Common\+Time\+Out}}
\begin{DoxyCompactList}\small\item\em redis通用同步超时时间（单位 毫秒） \end{DoxyCompactList}\item 
constexpr uint32\+\_\+t \mbox{\hyperlink{service__redis__client_8hpp_affbe1598865cab29d8e9427afcd10f44}{guild\+\_\+service\+::k\+Redis\+Common\+Time\+Out\+Async}}
\begin{DoxyCompactList}\small\item\em redis通用异步超时时间（单位 毫秒） \end{DoxyCompactList}\item 
\mbox{\Hypertarget{service__redis__client_8hpp_a88a88173d5ff99c3f1a9144b9f16603b}\label{service__redis__client_8hpp_a88a88173d5ff99c3f1a9144b9f16603b}} 
constexpr char \mbox{\hyperlink{service__redis__client_8hpp_a88a88173d5ff99c3f1a9144b9f16603b}{guild\+\_\+service\+::k\+Redis\+Host}} \mbox{[}$\,$\mbox{]} = \char`\"{}127.\+0.\+0.\+1\char`\"{}
\begin{DoxyCompactList}\small\item\em redis连接\+IP \end{DoxyCompactList}\item 
\mbox{\Hypertarget{service__redis__client_8hpp_a002e13f5d43fb9c06cc3d171f33a5e6b}\label{service__redis__client_8hpp_a002e13f5d43fb9c06cc3d171f33a5e6b}} 
constexpr uint32\+\_\+t \mbox{\hyperlink{service__redis__client_8hpp_a002e13f5d43fb9c06cc3d171f33a5e6b}{guild\+\_\+service\+::k\+Redis\+Port}} = 6379
\begin{DoxyCompactList}\small\item\em redis连接端口 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{service__redis__client_8hpp_aecb027365d990187d9c127f492f2634a}\label{service__redis__client_8hpp_aecb027365d990187d9c127f492f2634a}} 
constexpr char \mbox{\hyperlink{service__redis__client_8hpp_aecb027365d990187d9c127f492f2634a}{guild\+\_\+service\+::k\+Redis\+User}} \mbox{[}$\,$\mbox{]} = \char`\"{}\char`\"{}
\begin{DoxyCompactList}\small\item\em redis连接用户名 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{service__redis__client_8hpp_a3cd93c93d0185a9a19f6867eb324effd}\label{service__redis__client_8hpp_a3cd93c93d0185a9a19f6867eb324effd}} 
constexpr char \mbox{\hyperlink{service__redis__client_8hpp_a3cd93c93d0185a9a19f6867eb324effd}{guild\+\_\+service\+::k\+Redis\+Passwd}} \mbox{[}$\,$\mbox{]} = \char`\"{}\char`\"{}
\begin{DoxyCompactList}\small\item\em redis连接密码 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{service__redis__client_8hpp_a322cce982fc5893fe7276307644756fd}\label{service__redis__client_8hpp_a322cce982fc5893fe7276307644756fd}} 
constexpr char {\bfseries guild\+\_\+service\+::k\+Redis\+Get\+Op} \mbox{[}$\,$\mbox{]} = \char`\"{}G\+ET \char`\"{}
\item 
\mbox{\Hypertarget{service__redis__client_8hpp_a339b481af62882155617feee91f32ced}\label{service__redis__client_8hpp_a339b481af62882155617feee91f32ced}} 
constexpr char {\bfseries guild\+\_\+service\+::k\+Redis\+Set\+Op} \mbox{[}$\,$\mbox{]} = \char`\"{}S\+ET \char`\"{}
\item 
\mbox{\Hypertarget{service__redis__client_8hpp_a82219a29a310905b3f73c0e85c57bdbd}\label{service__redis__client_8hpp_a82219a29a310905b3f73c0e85c57bdbd}} 
constexpr char {\bfseries guild\+\_\+service\+::k\+Redis\+Del\+Op} \mbox{[}$\,$\mbox{]} = \char`\"{}D\+EL \char`\"{}
\item 
\mbox{\Hypertarget{service__redis__client_8hpp_af6539ae1a6c63b664a0c2b56866c0373}\label{service__redis__client_8hpp_af6539ae1a6c63b664a0c2b56866c0373}} 
constexpr char {\bfseries guild\+\_\+service\+::k\+Redis\+H\+Get\+Op} \mbox{[}$\,$\mbox{]} = \char`\"{}H\+G\+ET \char`\"{}
\item 
\mbox{\Hypertarget{service__redis__client_8hpp_ad151ea2695f5361fee5c6e9fda2d70f4}\label{service__redis__client_8hpp_ad151ea2695f5361fee5c6e9fda2d70f4}} 
constexpr char {\bfseries guild\+\_\+service\+::k\+Redis\+H\+Set\+Op} \mbox{[}$\,$\mbox{]} = \char`\"{}H\+S\+ET \char`\"{}
\item 
\mbox{\Hypertarget{service__redis__client_8hpp_a61c4a7a08d763854c45db8c13c8e1357}\label{service__redis__client_8hpp_a61c4a7a08d763854c45db8c13c8e1357}} 
constexpr char {\bfseries guild\+\_\+service\+::k\+Redis\+H\+Del\+Op} \mbox{[}$\,$\mbox{]} = \char`\"{}H\+D\+EL \char`\"{}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
服务redis客户端 

\begin{DoxyDate}{Date}
2021/05/10 21\+:03
\end{DoxyDate}
\begin{DoxyAuthor}{Author}
harrybao (\href{mailto:harrybao@123u.com}{\texttt{ harrybao@123u.\+com}})
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}
v1.\+0.\+0
\end{DoxyVersion}
\begin{DoxyCopyright}{Copyright}
Copyright © 2021 All Rights Reserved 上海欢乐互娱网络科技有限公司
\end{DoxyCopyright}
\begin{DoxyParagraph}{history\+:}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Date }&\cellcolor{\tableheadbgcolor}\textbf{ Version }&\cellcolor{\tableheadbgcolor}\textbf{ Author }&\cellcolor{\tableheadbgcolor}\textbf{ Description }\\\cline{1-4}
\endfirsthead
\hline
\endfoot
\hline
\cellcolor{\tableheadbgcolor}\textbf{ Date }&\cellcolor{\tableheadbgcolor}\textbf{ Version }&\cellcolor{\tableheadbgcolor}\textbf{ Author }&\cellcolor{\tableheadbgcolor}\textbf{ Description }\\\cline{1-4}
\endhead
2021/05/10 21\+:03 &1.\+0.\+0 &harrybao &创建初始版本 \\\cline{1-4}
\end{longtabu}

\end{DoxyParagraph}


\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{service__redis__client_8hpp_a0752d2320b846227ac97ce216d831e27}\label{service__redis__client_8hpp_a0752d2320b846227ac97ce216d831e27}} 
\index{service\_redis\_client.hpp@{service\_redis\_client.hpp}!RedisClientSingleton@{RedisClientSingleton}}
\index{RedisClientSingleton@{RedisClientSingleton}!service\_redis\_client.hpp@{service\_redis\_client.hpp}}
\doxysubsubsection{\texorpdfstring{RedisClientSingleton}{RedisClientSingleton}}
{\footnotesize\ttfamily \#define Redis\+Client\+Singleton(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{  (*common::singleton<common::service\_redis\_client>::instance( \(\backslash\)}
\DoxyCodeLine{      \_\_VA\_ARGS\_\_))}

\end{DoxyCode}


redis客户端单例 



\doxysubsection{Variable Documentation}
\mbox{\Hypertarget{service__redis__client_8hpp_a1d1da97ea7897858a311261ebd3f59c6}\label{service__redis__client_8hpp_a1d1da97ea7897858a311261ebd3f59c6}} 
\index{service\_redis\_client.hpp@{service\_redis\_client.hpp}!kRedisCommonTimeOut@{kRedisCommonTimeOut}}
\index{kRedisCommonTimeOut@{kRedisCommonTimeOut}!service\_redis\_client.hpp@{service\_redis\_client.hpp}}
\doxysubsubsection{\texorpdfstring{kRedisCommonTimeOut}{kRedisCommonTimeOut}}
{\footnotesize\ttfamily constexpr uint32\+\_\+t guild\+\_\+service\+::k\+Redis\+Common\+Time\+Out\hspace{0.3cm}{\ttfamily [constexpr]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{=}
\DoxyCodeLine{    1000}

\end{DoxyCode}


redis通用同步超时时间（单位 毫秒） 

\mbox{\Hypertarget{service__redis__client_8hpp_affbe1598865cab29d8e9427afcd10f44}\label{service__redis__client_8hpp_affbe1598865cab29d8e9427afcd10f44}} 
\index{service\_redis\_client.hpp@{service\_redis\_client.hpp}!kRedisCommonTimeOutAsync@{kRedisCommonTimeOutAsync}}
\index{kRedisCommonTimeOutAsync@{kRedisCommonTimeOutAsync}!service\_redis\_client.hpp@{service\_redis\_client.hpp}}
\doxysubsubsection{\texorpdfstring{kRedisCommonTimeOutAsync}{kRedisCommonTimeOutAsync}}
{\footnotesize\ttfamily constexpr uint32\+\_\+t guild\+\_\+service\+::k\+Redis\+Common\+Time\+Out\+Async\hspace{0.3cm}{\ttfamily [constexpr]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{=}
\DoxyCodeLine{    1000}

\end{DoxyCode}


redis通用异步超时时间（单位 毫秒） 

